//
//  ThemeExtended.swift
//  HeadlineNews
//
//  Created by han on 2019/7/22.
//  Copyright © 2019 han. All rights reserved.
//

import Foundation

struct ThemeExtended<T> {
    let value: T
    init(_ value: T) {
        self.value = value
    }
}

protocol ThemeExtendProtocol {
    associatedtype T
    var theme: ThemeExtended<T> { get  set }
    static var theme: ThemeExtended<T>.Type { get set }
}

extension ThemeExtendProtocol {
    var theme: ThemeExtended<Self> {
        get { return ThemeExtended(self) }
        set {}
    }
    
    static var theme: ThemeExtended<Self>.Type {
        get { return ThemeExtended<Self>.self }
        set {}
    }
}
